/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de Almeria
 * License Type: Purchased
 */
package foroindaltronia.bd;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class TemaCriteria extends AbstractORMCriteria {
	public final StringExpression nombre;
	public final DateExpression fechaCreacion;
	public final IntegerExpression ID;
	
	public TemaCriteria(Criteria criteria) {
		super(criteria);
		nombre = new StringExpression("nombre", this);
		fechaCreacion = new DateExpression("fechaCreacion", this);
		ID = new IntegerExpression("ID", this);
	}
	
	public TemaCriteria(PersistentSession session) {
		this(session.createCriteria(Tema.class));
	}
	
	public TemaCriteria() throws PersistentException {
		this(foroindaltronia.bd.ProyectoForoPersistentManager.instance().getSession());
	}
	
	public ModeradorCriteria createGestionadoCriteria() {
		return new ModeradorCriteria(createCriteria("gestionado"));
	}
	
	public UsuarioCriteria createCreado_porCriteria() {
		return new UsuarioCriteria(createCriteria("creado_por"));
	}
	
	public Tema uniqueTema() {
		return (Tema) super.uniqueResult();
	}
	
	public Tema[] listTema() {
		return (Tema[]) super.list().toArray(new Tema[super.list().size()]);
	}
}

